package com.ucs.daoMemImpl;

import java.util.ArrayList;
import java.util.List;

import com.ucs.dao.UserDao;
import com.ucs.domain.User;

public class UserDaoImpl implements UserDao {
	@SuppressWarnings("unchecked")
	public List getUsers() {
		List l = new ArrayList();
		l.add(createUser("gbao", "Guodi Bao", "password", 0));
		l.add(createUser("oliu", "Oliver Liu", "password", 1));
		return l;
	}

	private User createUser(String userID, String username, String pwd, int role) {
		User u = new User();
		u.setUserID(userID);
		u.setUsername(username);
		u.setPwd(pwd);
		u.setRole(0);
		return u;
	}
}
